package com.demo.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.demo.common.R;
import com.demo.domain.Category;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletRequest;
import java.util.List;


public interface CategoryService extends IService<Category> {

    /**
     * 分页显示分页管理
     * @param page
     * @param pageSize
     * @return
     */
    R<Page> page(int page, int pageSize);


    /**
     * 添加菜品类型与套餐
     * @param request
     * @param category
     * @return
     */
    R<String> save (HttpServletRequest request,@RequestBody Category category);


    /**
     * 删除菜品类型与套餐
     * @param id
     * @return
     */
    R<String> deleteById(@PathVariable Long id);


    /**
     * 修改菜品分类信息
     * @param category
     * @return
     */
    R<Category> updateCategory(@RequestBody Category category);

    /**
     * 菜品类型查询
     * @param category
     * @return
     */
    R<List<Category>> getDishList(Category category);
}
